package com.sunwayworld.basemodule.coredata.test.resource;

import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;
import com.sunwayworld.framework.restful.data.RestValidationResultBean;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import com.sunwayworld.basemodule.coredata.test.bean.LimsTestSupplementBean;
import com.sunwayworld.basemodule.coredata.test.service.LimsTestSupplementService;
import com.sunwayworld.framework.support.base.resource.GenericResource;
import org.springframework.web.bind.annotation.RequestMethod;

@RequestMapping("/secure/basemodule/coredata/test-supplements")
public interface LimsTestSupplementResource extends GenericResource<LimsTestSupplementService, LimsTestSupplementBean, Long> {

    @Log(
            value = "验证数据唯一性",
            type = LogType.VALIDATE
    )
    @RequestMapping(
            value = {"/{testId}/action/test-validate-unique"},
            method = {RequestMethod.POST}
    )
    RestValidationResultBean validateUniqueByTest(@PathVariable Long testId, RestJsonWrapperBean wrapper);
}
